#ifndef _RUN_H_
#define _RUN_H_ 1
#include "command_factory.h"
class Runner{
public:
  Runner(Editor *editor,std::string lexicon_dir):editor(editor){
    history = new CommandHistory();
    cf = new CommandFactory(editor,history,std::move(lexicon_dir));
  }
  ~Runner();
  std::string 
  run(std::string cmd_line);
private:
  Editor *editor;
  CommandHistory *history;
  CommandFactory *cf;
  Command * 
  analyze(std::string cmd_line);
  Command * 
  parse_ACommand(const std::string &name,std::string content)const;
  Command * 
  parse_DCommand(const std::string &name,std::string content)const;
  
};
#endif
